import ollama

while True:
    prompt = input("录入你要对模型说的话...(exit退出)")
    if prompt == 'exit':
        break
    response = ollama.chat(model='qwen2:0.5b',messages=[{"role":"user","content":prompt}])
    print(f"助手回答: {response['message']['content']}")